package 晚自习练习;

public class 求最大值 {
    public static void main(String[] args) {
        int[] arr = {120, 130, 110, 125, 128, 164};

        int max = arr[0];

        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        System.out.println("最大值是"+max);
    }
}
